interface Res {
  code: number;
  message: string;
}

export class BaseRes {
  code = 0;
  message = "";
  constructor({ code, message }: Res) {
    this.code = code;
    this.message = message;
  }
}

export class ErrorRes extends BaseRes {
  constructor({ code = 99999, message = "服务端错误" }: Res) {
    super({
      code,
      message,
    });
  }
}
